# -*- coding: utf-8 -*-
import numpy as np
import pandas as pd

if __name__ == '__main__':
    dict_data = {
        'A':1.,
        'B':pd.Timestamp('20171231'),
        'C':pd.Series(1, index=list(range(4)), dtype='float'),
        'D':np.array([3]*4, dtype='int'),
        'E':pd.Categorical(["Python", "Java", "Scala", "Shell"]),
        'F':"BigdataHadoop"
    }
    print dict_data
    frame = pd.DataFrame(dict_data)
    print frame
    print "======================"
    print frame['A']
    print type(frame['A'])
    print frame.A
    print "--------增加列---------------------"
    frame["G"] = frame["D"]+4
    print frame
    print "--------删除列----"
    del(frame["D"])
    print frame
